Page({
  data: {
    imageUrl:"",  //图片
    drawName:"",  //名称
    draw:{}  //画稿
  },
  onLoad(param){

      let that = this;
      my.showLoading({
        content: '加载中...'
      });
        //请求数据
      my.request({
      url: 'https://tiyi.site/seaHorse/app/draw/getOne/'+param.drawId,
      method: 'GET',
      data: {},
      dataType: 'json',
      success: function(res) {
        var draw = res.data.draw;
        that.setData({
          imageUrl:draw.picUrl,
          drawName:draw.drawName,
          'draw.source':draw.source,
          'draw.dateStr':draw.dateStr,
          'draw.drawAmount':draw.drawAmount,
          'draw.remark':draw.remark

        })
      },
      fail: function(res) {
        my.alert({content: res});
      },
      complete: function(res) {
        my.hideLoading();
      }
      });

  },
  onTap(e){
    my.previewImage({
    urls: [
      e.target.dataset.name
    ],
    });
  }
});